﻿<%@ CODEPAGE=65001 %>
<%
'///////////////////////////////////////////////////////////////////////////////
'// 插件应用:    Z-Blog 2.0 其它版本未知
'// 插件制作:    狼的旋律(http://www.wilf.cn) / zsx(http://www.zsxsoft.com)
'// 备    注:    修改相册分类
'// 最后修改:
'// 最后版本:
'///////////////////////////////////////////////////////////////////////////////
%>
<% Option Explicit %>
<% 'On Error Resume Next %>
<% Response.Charset="UTF-8" %>
<% Response.Buffer=True %>
<!-- #include file="../../c_option.asp" -->
<!-- #include file="../../../zb_system/function/c_function.asp" -->
<!-- #include file="../../../zb_system/function/c_system_lib.asp" -->
<!-- #include file="../../../zb_system/function/c_system_base.asp" -->
<!-- #include file="../../../zb_system/function/c_system_plugin.asp" -->
<!-- #include file="../p_config.asp" -->
<%
Call System_Initialize()
Call WindsPhoto_Initialize()

Call CheckReference("")

If BlogUser.Level>2 Then Call ShowError(6)
If CheckpluginState("windsphoto") = False Then Call ShowError(48)

BlogTitle = "WindsPhoto 修改相册"
%>
<!--#include file="..\..\..\zb_system\admin\admin_header.asp"-->
<script type="text/javascript" src="../../../zb_system/ADMIN/ueditor/ueditor.config.asp"></script>
<script type="text/javascript" src="../../../zb_system/ADMIN/ueditor/ueditor.all.min.js"></script>
<!--#include file="..\..\..\zb_system\admin\admin_top.asp"-->
<div id="divMain"><div id="ShowBlogHint"><%Call GetBlogHint()%></div>
	<div class="divHeader"><%=BlogTitle%></div>
    <div class="SubMenu"><%=WindsPhoto_SubMenu(0)%></div>
    <div id="divMain2">
		<script type="text/javascript">ActiveLeftMenu("aWindsPhoto")</script>
<%
Dim typeid,sql,rs,temprs,url
If IsNumeric(Request.QueryString("typeid")) = False Then
	Call SetBlogHint_Custom("参数错误.")
	Response.Redirect "admin_main.asp"
Else
	typeid = CInt(Request.QueryString("typeid"))
End If

sql = "SELECT * FROM WindsPhoto_zhuanti where id="&typeid
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, objConn, 1, 1
If rs.EOF And rs.bof Then
	Call SetBlogHint_Custom("还没有该相册.")
	Response.Redirect "admin_addtype.asp"
End If

Set temprs = objConn.Execute("select top 1 url FROM WindsPhoto_desktop where zhuanti="&typeid&" and hot<>0 order by id asc")
If temprs.EOF Or temprs.bof Then
	url = "images/notop.gif"
Else
	url = temprs("url")
End If
Set temprs = Nothing
%>
		<form id="edit" name="edit" method="post" action="admin_cmd.asp">
			<div style="float:right;"><a href="album.asp?typeid=<%=typeid%>" target="_blank"><img src="<%=url%>" title="相册封面" style="max-width:220px;" /></a></div>
			<p>相册名称:<input type="text" name="name" size="50" maxlength="50" value="<%=rs("name")%>" /></p>
			<p>相册排序:<input type="number" name="ordered" size="20" maxlength="20" value="<%=rs("ordered")%>" /></p>
			<p>查看密码:<input type="text" name="pass" size="20" maxlength="50" value="<%=rs("pass")%>" /> 明文保存，留空任何人可以浏览，no 为隐藏</p>
			<p>默认浏览方式:<input type="radio" name="view" id="view_0" value="0" <%If rs("view")=0 Then Response.Write "checked"%> /><label for="view_0">缩略图</label> <input type="radio" name="view" id="view_1" value="1" <%If rs("view")=1 Then Response.Write "checked"%> /><label for="view_1">列表</label> <input type="radio" name="view" id="view_2" value="2" <%If rs("view")=2 Then Response.Write "checked"%> /><label for="view_2">瀑布流(new)</label></p>
			<p>相关介绍:<br /><div><textarea name="js" id="editor_ue" style="width:500px;"><%=TransferHTML(rs("js"),"[textarea]")%></textarea></div></p>
			<p>操作选项:<input type="radio" name="action" id="action_e" value="editalbum" checked /><label for="action_e">修改</label> <input type="radio" name="action" id="action_d" onClick="alert(alt)" alt="该操作会删除这个相册和相册内的所有图片，请慎重对待！" value="delalbum" /><label for="action_d">删除</label></p>
			<input type="hidden" name="typeid" value="<%=typeid%>">
			<p>
			<input type="submit" name="submit" class="button" value="确定" />
			<input type="reset" name="reset" class="button" value="重置" />
			</p>
		</form>
    </div>
</div>
<script type="text/javascript">
// <![CDATA[
$(document).ready(function(){
	$("#edit").submit(function(){
		if(editor.queryCommandState("source")==1) editor.execCommand("source");
	}) //源码模式下保存时必须切换
});

var EditorOption = {
	toolbars:[['Source','fontsize','bold','italic','forecolor','emotion','blockquote','link','removeformat','formatmatch','autotypeset','insertorderedlist','insertunorderedlist','pasteplain']],
	autoHeightEnabled:false,
	initialFrameHeight:150
};
var editor=UE.getEditor('editor_ue',EditorOption);
// ]]>
</script>
<!--#include file="..\..\..\zb_system\admin\admin_footer.asp"-->
<%Call System_Terminate()%>